package com.example.myshop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.myshop.entity.Order;
import com.example.myshop.vo.OrderVO;
import com.example.myshop.vo.PayVO;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;


public interface OrderService extends IService<Order> {
    /*创建订单*/
    Order create(Long aid,Long[] cids, Long uid, String username);

    /*创建订单*/
    Order create1(Long aid,Long[] cids, Long uid, String username);


    /**
     * 根据订单id查询详情的列表
     * @param oid
     * @return
     */
    List<OrderVO> findVOByOid(Long oid);

    Order findOrderByOid(Long oid);

    void updateStatus(Long oid, Date payTime);

    /**
     * 根据用户id 查询详情的列表
     * @param uid 用户id
     * @return
     */
    List<OrderVO> findVOByUid(Long uid);

    /**
     * 根据用户id查询商家id
     * @param uid
     * @return
     */
    List<OrderVO> findBVOByUid(Long uid);

    /**
     * 根据用户id 订单id查询详情的列表
     * @param oid 订单id
     * @param uid 用户id
     * @return
     */
    List<OrderVO> findVOByOUid(Long oid,Long uid);



    /**
     * 根据订单id 用户id 商品id查询用户下单的某个商品
     * @param oid
     * @param pid
     * @return
     */
    OrderVO findVOByOUPid(Long oid, Long pid);

    List<PayVO> paySearch(Long pid);

    void updatePStatus(Long oid,Long pid,Integer pStatus);

    void updatePriority(Long oid,Long pid,Integer num);

    void updateSubPriority(Long oid,Long pid,Integer num);

    List<PayVO> businessOrder(Long businessId);

}
